using UnityEngine;

/// <summary>
/// 指示器类型枚举
/// </summary>
public enum IndicatorType
{
    /// <summary>
    /// 扇形
    /// </summary>
    Sector,      
    /// <summary>
    /// 定向包围盒
    /// </summary>
    OBB,         
    /// <summary>
    /// 圆形
    /// </summary>
    Circle,      
    /// <summary>
    /// 矩形
    /// </summary>
    Rectangle,   
    /// <summary>
    /// 胶囊体
    /// </summary>
    Capsule,     
    /// <summary>
    /// 十字形
    /// </summary>
    Cross,        
    /// <summary>
    /// 饼形（扇形图）
    /// </summary>
    Pie,         
    /// <summary>
    /// 环形
    /// </summary>
    Ring,        
    /// <summary>
    /// 胶囊体投射
    /// </summary>
    CapsuleCast,  
    /// <summary>
    /// 圆锥体
    /// </summary>
    Cone,       
    /// <summary>
    /// 甜甜圈（环形）
    /// </summary>
    Donut,       
    /// <summary>
    /// 抛物线
    /// </summary>
    Parabola,    
    /// <summary>
    /// 球体投射
    /// </summary>
    SphereCast   
}

/// <summary>
/// 指示器工厂类
/// </summary>
public static class IndicatorFactory
{
    public static IAttackIndicator CreateIndicator(IndicatorType type)
    {
        switch (type)
        {
            case IndicatorType.Sector:
                return new SectorIndicator();
            case IndicatorType.OBB:
                return new OBBIndicator();
            case IndicatorType.Circle:
                return new CircleIndicator();
            case IndicatorType.Rectangle:
                return new RectangleIndicator();
            case IndicatorType.Capsule:
                return new CapsuleIndicator();
            case IndicatorType.Cross:
                return new CrossIndicator();
            case IndicatorType.Pie:
                return new PieIndicator();
            case IndicatorType.Ring:
                return new RingIndicator();
            case IndicatorType.CapsuleCast:
                return new CapsuleCastIndicator();
            case IndicatorType.Cone:
                return new ConeIndicator();
            case IndicatorType.Donut:
                return new DonutIndicator();
            case IndicatorType.Parabola:
                return new ParabolaIndicator();
            case IndicatorType.SphereCast:
                return new SphereCastIndicator();
            default:
                Logger.LogError($"Unsupported indicator type: {type}");
                return null;
        }
    }
}